import React,{ useState } from 'react'
import Mylist from '../../components/mylist'
import { Search, Toast,Button, Cell } from 'react-vant';

function Index() {
    
     const [value, setValue] = useState('')
    let search=(val)=>{
        console.log(val,'val')
        // 点击按钮，加载
         Toast.loading({
            message: '加载中...',
            forbidClick: true,
          })
    }

  return (
    <div>
        {/* 搜索框 */}
        <div style={{display:'flex'}}>
             <Search style={{width:'70vw'}} value={value} clearable placeholder="请输入搜索关键词" /><Button onClick={()=>search(setValue)}>搜索 </Button>
        </div>
    
    {/* 列表封装组件 */}
      <Mylist></Mylist>
    </div>
  )
}

export default Index
